<?php
/*
*All rights reserved: Json.
*Links:http://www.liyaoquan.cn.
*Links:http://imarkchina.cn.
*Links:http://www.imarkchina.cn.
*/

/**
 * 博客后台设置控制器负责，业务流程判断
 * 后台所有操作都需要权限，必需继承 CommonAction 控制器
 */
Class GetsystemAction extends CommonAction{

	/**
	 * 博客设置首页
	 * @return [type] [description]
	 */
	Public function index(){
		$this->assign('c', M('Getsystem')->Show());
		$this->display();
	}

	/**
	 * 后台相关
	 * @return [type] [description]
	 */
	Public function rootset(){
		$this->assign('c', M('Getsystem')->Show());
		$this->display();
	}

	/**
	 *  附加功能
	 * @return [type] [description]
	 */
	Public function lateset(){
		$this->assign('dir', M('Getsystem')->ShowDir());
		$this->assign('c', M('Getsystem')->Show());
		$this->display();
	}

	/**
	 * 邮件相关
	 * @return [type] [description]
	 */
	Public function emailset(){
		$this->assign('c', M('Getsystem')->Show());
		$this->display();
	}

	/**
	 * 检查POST过来的数据
	 * @return [type] [description]
	 */
	Public function checkdata(){
		if (ISPOST) {
			if (M('Getsystem')->SaveData($_POST)) {
				$this->success('操作成功～！', U('index'));
			} else {
				$this->error('操作失败～！');
			}
		}
	}

	/**
	 * 博客设置共公链接
	 * @return [type] [description]
	 */
	Public function publicc(){
		$this->display();
	}
}